package com.qipay.scalar.type;

public enum BankEnum {
    ICBC("中国工商银行","01020000","ICBC","102100099996"),
    ABC("中国农业银行","01030000","ABC","103100000026"),
    BOC("中国银行 ","01040000","BOC","104100000004"),
    CCB("中国建设银行","01050000","CCB","105100000017"),
//    CDB("国家开发银行","","CDB",""),
//    EXIMBANK("中国进出口银行","","EXIMBANK",""),
//    ADBC("中国农业发展银行","","ADBC",""),
    BCOM("交通银行","03010000","BCOM","301290000007"),
    CITIC("中信银行","03020000","CITIC","302100011000"),
    CEB("光大银行","03030000","CEB","303100000006"),
    HXB("华夏银行","03040000","HXB","304100040000"),
    CMBC("民生银行","03050000","CMBC","305100000013"),
    CGB("广东发展银行","03060000","CGB","306581000003"),
    PAB("平安银行","3135840","PAB","307584007998"),
    CMB("招商银行","3085840","CMB","308584000013"),
    CIB("兴业银行","3091000","CIB","309391000011"),
    SPDB("浦东发展银行","","SPDB","310290000013"),
//    BIN("宁波国际银行","","BIN",""),
//    EGBANK("恒丰银行","","EGBANK",""),
//    CZB("浙商银行","","CZB",""),
//    BRCB("北京农村商业银行","","BRCB",""),
//    HSBC("汇丰银行","","HSBC",""),
//    HKBEA("东亚银行","","HKBEA",""),
//    NCBCHINA("南洋商业银行","","NCBCHINA",""),
//    HANGSENG("恒生银行","","HANGSENG",""),
//    SDB("深圳发展银行","","SDB",""),
//    UNIONPAY("中国银联","","UNIONPAY",""),
//    BOB("北京银行","","BOB",""),
//    HCCB("杭州银行","","HCCB",""),
//    NJCB("南京银行","","NJCB",""),

    PSBC("中国邮政储蓄银行","01000000","PSBC","403100000004");

    private String info;
    private String code;
    private String bankCode;
    private String bankAgentId;

    BankEnum(String info, String code, String bankCode,String bankAgentId) {
        this.info = info;
        this.code = code;
        this.bankCode = bankCode;
        this.bankAgentId = bankAgentId;
    }

    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getBankAgentId() {
        return bankAgentId;
    }

    public void setBankAgentId(String bankAgentId) {
        this.bankAgentId = bankAgentId;
    }

    public static boolean contains(String type){
        for(BankEnum typeEnum : BankEnum.values()){
            if(typeEnum.name().equals(type)){
                return true;
            }
        }
        return false;
    }
    public static String getCode(String bankCode) {
        String code = "";
        for (BankEnum p : BankEnum.values()) {
            if (p.getBankCode().equals(bankCode)) {
                code = p.getCode();
                break;
            }
        }

        return code;
    }
    public static String getInfo(String bankCode) {
        String info = "";
        for (BankEnum p : BankEnum.values()) {
            if (p.getBankCode().equals(bankCode)) {
                info = p.getInfo();
                break;
            }
        }
        return info;
    }
    public static String getBankAgentId(String bankCode) {
        String bankAgentId = "";
        for (BankEnum p : BankEnum.values()) {
            if (p.getBankCode().equals(bankCode)) {
                bankAgentId = p.bankAgentId;
                break;
            }
        }
        return bankAgentId;
    }
}
